/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyectoia;

/**
 *
 * @author Brian
 */
public class Data {
    int time[];
    int requests[];
    long executionTime;
    int numServers;

    
    Data(DistFileSystemState state) {
       
       time = new int[state.numServers];
       requests = new int[state.numServers];
       numServers = state.numServers;
       
       for (int i = 0; i < state.numServers; i++) {
           time[i] = state.serverTime[i];
           requests[i] = state.allocations.size();
       }    
    }
    
    public int getNumServers() {
        return numServers;
    }
    
    public double getTime(int server) {
        return time[server];
    }
    
    public double getMaxTime() {
        double max = 0.0;
        for (int i = 0; i < time.length; i++) {
            if (time[i] > max) {
                max = time[i];
            }
        }
        return max;
    }
    
    public int getNumRequest(int server) {
            return requests[server];
    }
}
